{% extends 'layout.html' %} 
{% block main %}
<div class="table_content">
    <div class="table_content_head pd_b20 pd_t20 clear">
        <a href="javascript:window.history.back();" class="small_btn orange_color fr">返回</a>
    </div>
    <form action="/admin/users/edit?id={{user.id}}" method="post">
		<div class="form-group">
	    	<label for="tagName">用户名</label>
	    	<input type="text" name="username" class="form-control" value="{{user.username}}" placeholder="请输入用户名">
	  	</div>
	  	<div class="form-group">
	    	<label for="tagName">密码</label>
	    	<input type="password" name="password" class="form-control" value="" placeholder="请输入密码">
	  	</div>
	  	<div class="form-group">
	    	<label for="tagName">邮箱</label>
	    	<input type="email" name="email" class="form-control" value="{{user.email}}" placeholder="请输入email">
	  	</div>
	  	<div class="form-group mr_b0">
	  		<label for="tagName">是否是管理员</label>
	  	</div>
		<div class="form-group">
			<div class="create_add_line mr_t0 clear">
	            <div class="create_add_r ofh">
	                <ul class="check_list clear">
	                	
	                    <li class="radio_input {% if user.isAdmin == 1 %} active {% endif%} " onclick="checkRadio(this,'radio');"><span class="check_btn icon"></span><input name="isAdmin" type="radio" value="1" {% if user.isAdmin == 1  %} checked="checked" {% endif%}/>是</li>
	                    <li class="radio_input {% if user.isAdmin == 0 %} active {% endif%} " onclick="checkRadio(this,'radio');"><span class="check_btn icon"></span><input name="isAdmin" type="radio" value="0" {% if user.isAdmin == 0  %} checked="checked" {% endif%}/>否</li>
	                
	                </ul>
	            </div>
	        </div>
        </div>
	  	<div class="form-group">
	    	<div class="col-sm-offset-2 col-sm-10">
	      		<button type="submit" class="btn btn-default orange_color mr_r20">保存</button><button type="button" onclick="confirmAlert('{{messageText}}','{{hrefUrl}}');" class="btn btn-default">取消</button>
	    	</div>
	  	</div>
	</form>
</div>
{% endblock %}
